home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group98b.txt / 000027_icon-group-sender _Thu May 14 12:24:48 1998.msg < prev    next >
Internet Message Format  |  2000-09-20  |  3KB

  1. Return-Path: <icon-group-sender>
  2. Received: from kingfisher.CS.Arizona.EDU (kingfisher.CS.Arizona.EDU [192.12.69.239])
  3.     by baskerville.CS.Arizona.EDU (8.8.8/8.8.7) with SMTP id MAA12481
  4.     for <icon-group-addresses@baskerville.CS.Arizona.EDU>; Thu, 14 May 1998 12:24:48 -0700 (MST)
  5. Received: by kingfisher.CS.Arizona.EDU (5.65v4.0/1.1.8.2/08Nov94-0446PM)
  6.     id AA22028; Thu, 14 May 1998 12:24:43 -0700
  7. Message-Id: <3.0.5.32.19980514113425.007b1e80@doors>
  8. X-Sender: bgbauer#alpha.delta.edu@doors
  9. X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.5 (32)
  10. Date: Thu, 14 May 1998 11:34:25 -0700
  11. To: "Icon Group"<icon-group@optima.CS.Arizona.EDU>
  12. From: Scissors <jebediah@bigfoot.com>
  13. Subject: system command in win95
  14. Mime-Version: 1.0
  15. Content-Type: text/plain; charset="us-ascii"
  16. Errors-To: icon-group-errors@optima.CS.Arizona.EDU
  17. Status: RO
  18. Content-Length: 1697
  19.  
  20.  
  21. Im using win95 and have a few successful uses of the system command,
  22. but i havent tried it with piping or redirection.   I dont doubt it
  23. is causing a problem for you though. 
  24.  
  25. So, i've had success with it, but I find it VERY slow.  If youre 
  26. sending the output to another file... try pausing for 10 seconds, and
  27. then reading the file.   I use a system command
  28.  
  29. system("regedit /e etc...") which exports part of the registry to a file if
  30. you arent familiar with it.  And I have had to implement a large pause
  31. before I 
  32. can find the file!
  33.  
  34. if I do:
  35.  
  36. system(prog)   # any command which creates a new? file
  37. every 1 to 50000 do if exists(newfile) then break  # file created
  38. if not exists(newfile) then stop("file not created")
  39.  
  40. Of course, this is just a work around.  It was working... but only if my
  41. loop was VERY generous.  My conclusion was that system releases before the
  42. command is totally finished.  I have no way of knowing who is to blame, dos
  43. or icon.
  44.  
  45. As for the listing of files in a dir...
  46.  
  47. Look in io.icn.  It contains procedures for reading directories.  I believe
  48. it uses internal commands and interupts, and should be much faster and
  49. better than system("DIR").   I havent tried them, so I cant explain, maybe
  50. someone else can.   One I believe is DOS_Dir_list? or something similar...
  51. there are a few, check em out.
  52.  
  53. And finally, another work around, but it will accomplish what you need, is to
  54. write a batch file, then run it.  Such as:
  55.  
  56. batch := open("C:\temp\ver.bat", "w")
  57. write(batch, "VER > ver.log")
  58. close(batch)
  59. system("C:\temp\ver.bat")
  60.  
  61. Then try reading.  Its possible this may not work either though, if
  62. system() is
  63. releasing too soon.  *shrug* It's worth a try though.
  64.  
  65.  
  66.  
  67.  
  68.